package application {
	import flash.display.Shape;
	import flash.display.SimpleButton;
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import flash.system.Security;
	import flash.events.MouseEvent;
	
	public class ASDemo extends Sprite {
		public function ASDemo() {
			var button:SimpleButton = new SimpleButton( );
			button.x = 20;
			button.y = 20;
			button.upState = createCircle( 0x00FF00, 50 );
			button.overState = createCircle( 0xFFFFFF, 16 );
			button.downState = createCircle( 0xCCCCCC, 15 );
			button.hitTestState = button.upState;
			button.addEventListener( MouseEvent.CLICK, handleClick );
			addChild( button );
		}
		
		protected function handleClick(event:Event):void {
			
		}
		
		private function createCircle(color:uint, radius:Number):Sprite {
			var shape:Sprite = new Sprite();
			shape.graphics.beginFill(color);
			shape.graphics.drawCircle(0, 0, radius);
			shape.graphics.endFill();
			return shape;
		}
	}
}